home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / MPW Oberon 2.1168 / OInterfaces / IntlResources.mod < prev    next >
Encoding:
Text File  |  1995-08-10  |  13.5 KB  |  328 lines  |  [TEXT/MPS ]

  1. (*
  2.      File:        IntlResources.mod
  3.  
  4.      Contains:    International Resource definitions.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs.applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. *)
  19.  
  20. (*$TAGS-*)
  21. (*$CALLING PASCAL*)
  22. MODULE IntlResources;
  23.  
  24. IMPORT SYSTEM, Types;
  25.  
  26. (* $PUSH*)
  27. (* $ALIGN MAC68K*)
  28. (* $LibExport+*)
  29.  
  30. CONST
  31. (* Bits in the itlcFlags byte *)
  32.     itlcShowIcon*                = 7;                            (*Show icon even if only one script*)
  33.     itlcDualCaret*                = 6;                            (*Use dual caret for mixed direction text*)
  34. (* Bits in the itlcSysFlags word *)
  35.     itlcSysDirection*            = 15;                            (*System direction - left to right/right to left*)
  36. (* the NumberParts indices *)
  37.     tokLeftQuote*                = 1;
  38.     tokRightQuote*                = 2;
  39.     tokLeadPlacer*                = 3;
  40.     tokLeader*                    = 4;
  41.     tokNonLeader*                = 5;
  42.     tokZeroLead*                    = 6;
  43.     tokPercent*                    = 7;
  44.     tokPlusSign*                    = 8;
  45.     tokMinusSign*                = 9;
  46.     tokThousands*                = 10;
  47.     tokSeparator*                = 12;                            (*11 is a reserved field*)
  48.     tokEscape*                    = 13;
  49.     tokDecPoint*                    = 14;
  50.     tokEPlus*                    = 15;
  51.     tokEMinus*                    = 16;
  52.     tokMaxSymbols*                = 31;
  53.     curNumberPartsVersion*        = 1;                            (*current version of NumberParts record*)
  54.  
  55.     currSymLead*                    = 16;
  56.     currNegSym*                    = 32;
  57.     currTrailingZ*                = 64;
  58.     currLeadingZ*                = 128;
  59.  
  60.     mdy*                            = 0;
  61.     dmy*                            = 1;
  62.     ymd*                            = 2;
  63.     myd*                            = 3;
  64.     dym*                            = 4;
  65.     ydm*                            = 5;
  66.  
  67.     
  68. TYPE
  69.     DateOrders* = Types.SInt8;
  70.  
  71.  
  72. CONST
  73.     timeCycle24*                    = 0;                            (*time sequence 0:00 - 23:59*)
  74.     timeCycleZero*                = 1;                            (*time sequence 0:00-11:59, 0:00 - 11:59*)
  75.     timeCycle12*                    = 255;                            (*time sequence 12:00 - 11:59, 12:00 - 11:59*)
  76.     zeroCycle*                    = 1;                            (*old name for timeCycleZero*)
  77.     longDay*                        = 0;                            (*day of the month*)
  78.     longWeek*                    = 1;                            (*day of the week*)
  79.     longMonth*                    = 2;                            (*month of the year*)
  80.     longYear*                    = 3;                            (*year*)
  81.     supDay*                        = 1;                            (*suppress day of month*)
  82.     supWeek*                        = 2;                            (*suppress day of week*)
  83.     supMonth*                    = 4;                            (*suppress month*)
  84.     supYear*                        = 8;                            (*suppress year*)
  85.     dayLdingZ*                    = 32;
  86.     mntLdingZ*                    = 64;
  87.     century*                        = 128;
  88.     secLeadingZ*                    = 32;
  89.     minLeadingZ*                    = 64;
  90.     hrLeadingZ*                    = 128;
  91.  
  92. (* move OffsetTable to QuickdrawText *)
  93.  
  94. TYPE
  95.     Intl0Rec* = (*ΔΔPACKEDΔΔ*) RECORD
  96.         decimalPt*:                CHAR;                                    (*decimal point character*)
  97.         thousSep*:                CHAR;                                    (*thousands separator character*)
  98.         listSep*:                CHAR;                                    (*list separator character*)
  99.         currSym1*:                CHAR;                                    (*currency symbol*)
  100.         currSym2*:                CHAR;
  101.         currSym3*:                CHAR;
  102.         currFmt*:                Types.UInt8;                                    (*currency format flags*)
  103.         dateOrder*:                Types.UInt8;                                    (*order of short date elements*: mdy, dmy, etc.*)
  104.         shrtDateFmt*:            Types.UInt8;                                    (*format flags for each short date element*)
  105.         dateSep*:                CHAR;                                    (*date separator character*)
  106.         timeCycle*:                Types.UInt8;                                    (*specifies time cycle*: 0..23, 1..12, or 0..11*)
  107.         timeFmt*:                Types.UInt8;                                    (*format flags for each time element*)
  108.         mornStr*:                (*ΔΔPACKEDΔΔ*) ARRAY 4 (*ΔΔ[1..4]ΔΔ*) OF CHAR;            (*trailing string for AM if 12-hour cycle*)
  109.         eveStr*:                    (*ΔΔ PACKED*) ARRAY 4 (*ΔΔ[1..4]ΔΔ*) OF CHAR;            (*trailing string for PM if 12-hour cycle*)
  110.         timeSep*:                CHAR;                                    (*time separator character*)
  111.         time1Suff*:                CHAR;                                    (*trailing string for AM if 24-hour cycle*)
  112.         time2Suff*:                CHAR;
  113.         time3Suff*:                CHAR;
  114.         time4Suff*:                CHAR;
  115.         time5Suff*:                CHAR;                                    (*trailing string for PM if 24-hour cycle*)
  116.         time6Suff*:                CHAR;
  117.         time7Suff*:                CHAR;
  118.         time8Suff*:                CHAR;
  119.         metricSys*:                Types.UInt8;                                    (*255 if metric, 0 if inches etc.*)
  120.         intl0Vers*:                INTEGER;                                (*region code (hi byte) and version (lo byte)*)
  121.     END;
  122.  
  123.     Intl0Ptr* = POINTER TO Intl0Rec;
  124.     Intl0Hndl* = HANDLE TO Intl0Rec (*ΔΔ POINTER TO Intl0RecPtr*);
  125.  
  126.     Intl1Rec* = (*ΔΔPACKEDΔΔ*) RECORD
  127.         days*:                    ARRAY 7 (*ΔΔ[1..7]ΔΔ*) OF Types.Str15;                    (*day names*)
  128.         months*:                    ARRAY 12 (*ΔΔ[1..12]ΔΔ*) OF Types.Str15;                    (*month names*)
  129.         suppressDay*:            Types.UInt8;                                    (*255 for no day, or flags to suppress any element*)
  130.         lngDateFmt*:                Types.UInt8;                                    (*order of long date elements*)
  131.         dayLeading0*:            Types.UInt8;                                    (*255 for leading 0 in day number*)
  132.         abbrLen*:                Types.UInt8;                                    (*length for abbreviating names*)
  133.         st0*:                    (*ΔΔ PACKED*) ARRAY 4 (*ΔΔ[1..4]ΔΔ*) OF CHAR;            (*separator strings for long date format*)
  134.         st1*:                    (*ΔΔ PACKED*) ARRAY 4 (*ΔΔ[1..4]ΔΔ*) OF CHAR;
  135.         st2*:                    (*ΔΔ PACKED*) ARRAY 4 (*ΔΔ[1..4]ΔΔ*) OF CHAR;
  136.         st3*:                    (*ΔΔ PACKED*) ARRAY 4 (*ΔΔ[1..4]ΔΔ*) OF CHAR;
  137.         st4*:                    (*ΔΔ PACKED*) ARRAY 4 (*ΔΔ[1..4]ΔΔ*) OF CHAR;
  138.         intl1Vers*:                INTEGER;                                (*region code (hi byte) and version (lo byte)*)
  139.         localRtn*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF INTEGER;                (*now a flag for opt extension*)
  140.     END;
  141.  
  142.     Intl1Ptr* = POINTER TO Intl1Rec;
  143.     Intl1Hndl* = HANDLE TO Intl1Rec (*ΔΔ POINTER TO Intl1RecPtr*);
  144.  
  145. (*fields for optional itl1 extension*)
  146.     Itl1ExtRec* = RECORD
  147.         base*:                    Intl1Rec;                                (*un-extended Intl1Rec*)
  148.         version*:                INTEGER;
  149.         format*:                    INTEGER;
  150.         calendarCode*:            INTEGER;                                (*calendar code for this itl1 resource*)
  151.         extraDaysTableOffset*:    LONGINT;                                (*offset in itl1 to extra days table*)
  152.         extraDaysTableLength*:    LONGINT;                                (*length of extra days table*)
  153.         extraMonthsTableOffset*:    LONGINT;                                (*offset in itl1 to extra months table*)
  154.         extraMonthsTableLength*:    LONGINT;                                (*length of extra months table*)
  155.         abbrevDaysTableOffset*:    LONGINT;                                (*offset in itl1 to abbrev days table*)
  156.         abbrevDaysTableLength*:    LONGINT;                                (*length of abbrev days table*)
  157.         abbrevMonthsTableOffset*: LONGINT;                                (*offset in itl1 to abbrev months table*)
  158.         abbrevMonthsTableLength*: LONGINT;                                (*length of abbrev months table*)
  159.         extraSepsTableOffset*:    LONGINT;                                (*offset in itl1 to extra seps table*)
  160.         extraSepsTableLength*:    LONGINT;                                (*length of extra seps table*)
  161.         tables*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF INTEGER;                (*now a flag for opt extension*)
  162.     END;
  163.  
  164.     UntokenTable* = RECORD
  165.         len*:                    INTEGER;
  166.         lastToken*:                INTEGER;
  167.         index*:                    ARRAY 256 (*ΔΔ[0..255]ΔΔ*) OF INTEGER;                (*index table; last* = lastToken*)
  168.     END;
  169.  
  170.     UntokenTablePtr* = POINTER TO UntokenTable;
  171.     UntokenTableHandle* = HANDLE TO UntokenTable (*ΔΔ POINTER TO UntokenTablePtr*);
  172.  
  173.     WideChar* = RECORD
  174.         (*ΔΔ CASE INTEGER OF
  175.         0: ( *)
  176.             a*:                            (*ΔΔPACKEDΔΔ*) ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF CHAR;        (*0 is the high order character*)
  177.            (*);
  178.         1: (
  179.             b*:                            INTEGER;
  180.            );*)
  181.     END;
  182.  
  183.     WideCharArr* = RECORD
  184.         size*:                    INTEGER;
  185.         data*:                    ARRAY 10 (*ΔΔ[0..9]ΔΔ*) OF WideChar;
  186.     END;
  187.  
  188.     NumberParts* = RECORD
  189.         version*:                INTEGER;
  190.         data*:                    (*ΔΔPACKEDΔΔ*) ARRAY 31 (*ΔΔ[0..30]*) OF WideChar;        (*index by [tokLeftQuote..tokMaxSymbols]ΔΔ*)
  191.         pePlus*:                    WideCharArr;
  192.         peMinus*:                WideCharArr;
  193.         peMinusPlus*:            WideCharArr;
  194.         altNumTable*:            WideCharArr;
  195.         reserved*:                (*ΔΔPACKEDΔΔ*) ARRAY 20 (*ΔΔ[0..19]ΔΔ*) OF CHAR;
  196.     END;
  197.  
  198.     NumberPartsPtr* = POINTER TO NumberParts;
  199.  
  200.     Itl4Rec* = RECORD
  201.         flags*:                    INTEGER;                                (*reserved*)
  202.         resourceType*:            LONGINT;                                (*contains LONG("itl4")*)
  203.         resourceNum*:            INTEGER;                                (*resource AIFF.ID*)
  204.         version*:                INTEGER;                                (*version number*)
  205.         resHeader1*:                LONGINT;                                (*reserved*)
  206.         resHeader2*:                LONGINT;                                (*reserved*)
  207.         numTables*:                INTEGER;                                (*number of tables, one-based*)
  208.         mapOffset*:                LONGINT;                                (*offset to table that maps byte to token*)
  209.         strOffset*:                LONGINT;                                (*offset to routine that copies canonical string*)
  210.         fetchOffset*:            LONGINT;                                (*offset to routine that gets next byte of character*)
  211.         unTokenOffset*:            LONGINT;                                (*offset to table that maps token to canonical string*)
  212.         defPartsOffset*:            LONGINT;                                (*offset to default number parts table*)
  213.         resOffset6*:                LONGINT;                                (*reserved*)
  214.         resOffset7*:                LONGINT;                                (*reserved*)
  215.         resOffset8*:                LONGINT;                                (*reserved*)
  216.     END;
  217.  
  218.     Itl4Ptr* = POINTER TO Itl4Rec;
  219.     Itl4Handle* = HANDLE TO Itl4Rec (*ΔΔ POINTER TO Itl4RecPtr*);
  220.  
  221. (* New NItl4Rec for System 7.0: *)
  222.     NItl4Rec* = RECORD
  223.         flags*:                    INTEGER;                                (*reserved*)
  224.         resourceType*:            LONGINT;                                (*contains LONG("itl4")*)
  225.         resourceNum*:            INTEGER;                                (*resource AIFF.ID*)
  226.         version*:                INTEGER;                                (*version number*)
  227.         format*:                    INTEGER;                                (*format code*)
  228.         resHeader*:                INTEGER;                                (*reserved*)
  229.         resHeader2*:                LONGINT;                                (*reserved*)
  230.         numTables*:                INTEGER;                                (*number of tables, one-based*)
  231.         mapOffset*:                LONGINT;                                (*offset to table that maps byte to token*)
  232.         strOffset*:                LONGINT;                                (*offset to routine that copies canonical string*)
  233.         fetchOffset*:            LONGINT;                                (*offset to routine that gets next byte of character*)
  234.         unTokenOffset*:            LONGINT;                                (*offset to table that maps token to canonical string*)
  235.         defPartsOffset*:            LONGINT;                                (*offset to default number parts table*)
  236.         whtSpListOffset*:        LONGINT;                                (*offset to white space code list*)
  237.         resOffset7*:                LONGINT;                                (*reserved*)
  238.         resOffset8*:                LONGINT;                                (*reserved*)
  239.         resLength1*:                INTEGER;                                (*reserved*)
  240.         resLength2*:                INTEGER;                                (*reserved*)
  241.         resLength3*:                INTEGER;                                (*reserved*)
  242.         unTokenLength*:            INTEGER;                                (*length of untoken table*)
  243.         defPartsLength*:            INTEGER;                                (*length of default number parts table*)
  244.         whtSpListLength*:        INTEGER;                                (*length of white space code list*)
  245.         resLength7*:                INTEGER;                                (*reserved*)
  246.         resLength8*:                INTEGER;                                (*reserved*)
  247.     END;
  248.  
  249.     NItl4Ptr* = POINTER TO NItl4Rec;
  250.     NItl4Handle* = HANDLE TO NItl4Rec (*ΔΔ POINTER TO NItl4RecPtr*);
  251.  
  252.     TableDirectoryRecord* = RECORD
  253.         tableSignature*:            Types.OSType;                                    (*4 byte long table name *)
  254.         reserved*:                LONGINT;                                (*Reserved for internal use *)
  255.         tableStartOffset*:        LONGINT;                                (*Table start offset in byte*)
  256.         tableSize*:                LONGINT;                                (*Table size in byte*)
  257.     END;
  258.  
  259.     Itl5Record* = RECORD
  260.         versionNumber*:            Types.Fixed;                                    (*itl5 resource version number *)
  261.         numberOfTables*:            INTEGER;                                (*Number of tables it contains *)
  262.         reserved*:                ARRAY 3 (*ΔΔ[0..2]ΔΔ*) OF INTEGER;                (*Reserved for internal use *)
  263.         tableDirectory*:            ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF TableDirectoryRecord;    (*Table directory records *)
  264.     END;
  265.  
  266.     RuleBasedTrslRecord* = RECORD
  267.         sourceType*:                INTEGER;                                (*Transliterate target type for the LHS of the rule *)
  268.         targetType*:                INTEGER;                                (*Transliterate target type for the RHS of the rule *)
  269.         formatNumber*:            INTEGER;                                (*Transliterate resource format number *)
  270.         propertyFlag*:            INTEGER;                                (*Transliterate property flags *)
  271.         numberOfRules*:            INTEGER;                                (*Number of rules following this field *)
  272.     END;
  273.  
  274.     ItlcRecord* = RECORD
  275.         itlcSystem*:                INTEGER;                                (*default system script*)
  276.         itlcReserved*:            INTEGER;                                (*reserved*)
  277.         itlcFontForce*:            Types.SInt8;                                    (*default font force flag*)
  278.         itlcIntlForce*:            Types.SInt8;                                    (*default intl force flag*)
  279.         itlcOldKybd*:            Types.SInt8;                                    (*MacPlus intl keybd flag*)
  280.         itlcFlags*:                Types.SInt8;                                    (*general flags*)
  281.         itlcIconOffset*:            INTEGER;                                (*keyboard icon offset; not used in 7.0*)
  282.         itlcIconSide*:            Types.SInt8;                                    (*keyboard icon side; not used in 7.0*)
  283.         itlcIconRsvd*:            Types.SInt8;                                    (*rsvd for other icon info*)
  284.         itlcRegionCode*:            INTEGER;                                (*preferred verXxx code*)
  285.         itlcSysFlags*:            INTEGER;                                (*flags for setting system globals*)
  286.         itlcReserved4*:            (*ΔΔPACKEDΔΔ*) ARRAY 32 (*ΔΔ[0..31]ΔΔ*) OF Types.SInt8;            (*for future use*)
  287.     END;
  288.  
  289.     ItlbRecord* = RECORD
  290.         itlbNumber*:                INTEGER;                                (*itl0 id number*)
  291.         itlbDate*:                INTEGER;                                (*itl1 id number*)
  292.         itlbSort*:                INTEGER;                                (*itl2 id number*)
  293.         itlbFlags*:                INTEGER;                                (*Script flags*)
  294.         itlbToken*:                INTEGER;                                (*itl4 id number*)
  295.         itlbEncoding*:            INTEGER;                                (*itl5 AIFF.ID # (optional; char encoding)*)
  296.         itlbLang*:                INTEGER;                                (*current language for script *)
  297.         itlbNumRep*:                Types.SInt8;                                    (*number representation code*)
  298.         itlbDateRep*:            Types.SInt8;                                    (*date representation code *)
  299.         itlbKeys*:                INTEGER;                                (*KCHR id number*)
  300.         itlbIcon*:                INTEGER;                                (*AIFF.ID # of SICN or kcs#/kcs4/kcs8 suite.*)
  301.     END;
  302.  
  303. (* New ItlbExtRecord structure for System 7.0 *)
  304.     ItlbExtRecord* = (*ΔΔPACKEDΔΔ*) RECORD
  305.         base*:                    ItlbRecord;                                (*un-extended ItlbRecord*)
  306.         itlbLocalSize*:            LONGINT;                                (*size of script's local record*)
  307.         itlbMonoFond*:            INTEGER;                                (*default monospace FOND AIFF.ID*)
  308.         itlbMonoSize*:            INTEGER;                                (*default monospace font size*)
  309.         itlbPrefFond*:            INTEGER;                                (*preferred FOND AIFF.ID*)
  310.         itlbPrefSize*:            INTEGER;                                (*preferred font size*)
  311.         itlbSmallFond*:            INTEGER;                                (*default small FOND AIFF.ID*)
  312.         itlbSmallSize*:            INTEGER;                                (*default small font size*)
  313.         itlbSysFond*:            INTEGER;                                (*default system FOND AIFF.ID*)
  314.         itlbSysSize*:            INTEGER;                                (*default system font size*)
  315.         itlbAppFond*:            INTEGER;                                (*default application FOND AIFF.ID*)
  316.         itlbAppSize*:            INTEGER;                                (*default application font size*)
  317.         itlbHelpFond*:            INTEGER;                                (*default Help Mgr FOND AIFF.ID*)
  318.         itlbHelpSize*:            INTEGER;                                (*default Help Mgr font size*)
  319.         itlbValidStyles*:        Types.Style;                                    (*set of valid styles for script*)
  320.         itlbAliasStyle*:            Types.Style;                                    (*style (set) to mark aliases*)
  321.     END;
  322.  
  323.  
  324. (* $ALIGN RESET*)
  325. (* $POP*)
  326.  
  327.  END IntlResources.
  328.